//导入
import { http } from '@/utils/http'
import type { BannerItem, HomtItem, PanelItem } from '@/types/Home'
/**
 * 首页-广告区域-小程序
 * @param distrbutionSite 广告区域展示位置(投放位置 1为首页， 2为分类商品页)
 * @returns
 */
export const getHomeBannerAPI = (distrbutionSite = 1) => {
  return http<BannerItem[]>({
    method: 'GET',
    url: '/home/banner',
    data: {
      distrbutionSite,
    },
  })
}

/**
 * 首页-前台分类-小程序
 */
export const getHomePanelAPI = () => {
  return http<PanelItem[]>({
    method: 'GET',
    url: '/home/category/mutli',
  })
}

/**
 * 首页-热门推荐-小程序
 */

export const getHomtAPI = () => {
  return http<HomtItem[]>({
    method: 'GET',
    url: '/home/hot/mutli',
  })
}
